//
//  AccountPrecdite.h
//  HomeFurnishingDecoration
//
//  Created by 李劲成 on 16/5/23.
//  Copyright © 2016年 ljc. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface AccountPrecdite : NSObject

typedef enum{
    // 用户名空
    UsernameNil,
    // 用户名不存在
    UsernameNonexistence,
    // 用户名不合法
    UsernameIllegal
}UsernameError;

typedef enum{
    // 密码空
    PasswordNil,
    // 密码错误
    PasswordNonexistence,
    // 密码不合法
    PasswordIllegal,
    // 两次密码不匹配
    PasswordsIncompatible
}PasswordError;

+(BOOL)filterUser:(NSString *)userName completionHandle:(void (^)(UsernameError usernameError))completion;

+(BOOL)filterPassword:(NSString *)password repeatedPassword:(NSString *)repeatedPassword completionHandle:(void (^)(PasswordError passwordError))completion;


void presentAlert(UIViewController *vc, NSString *title, NSString *message);


@end
